﻿/* Ree7 Tile Toolkit for Windows Phone
 * Copyright (C) 2011-2014 Pierre BELIN <pierre@ree7.fr>, and project contributors.
 *
 * Distributed under the Microsoft Public License (Ms-PL).
 * See accompanying file License.txt */

using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace Ree7.TileToolkit.Helpers
{
	internal class TileContainerProvider
	{
		static Size s_SmallTileSize = new Size { Height = 159, Width = 159 };
		static Size s_MediumTileSize = new Size { Height = 336, Width = 336 };
		static Size s_LargeTileSize = new Size { Height = 336, Width = 691 };

		public static CustomTile GetTileContainer(TileSize size)
		{
			Size s = s_MediumTileSize;
			switch(size)
			{
				case TileSize.Small: s = s_SmallTileSize; break;
				case TileSize.Wide: s = s_LargeTileSize; break;
				default: break;
			}

			return new CustomTile()
			{
				Background = PhoneThemeResources.PhoneAccentBrush,
				Height = s.Height,
				Width = s.Width
			};
		}
	}
}
